import './index.scss';
import { useAppSelector } from '../../store/hook';

const Genres = ({ data }: any) => {
  const { genres } = useAppSelector(state => state.home);

  return (
    <div className="genres">
      {data?.map((g: any) => {
        if (!genres[g]?.name) return;
        return (
          <div key={g} className="genre">
            {genres[g]?.name}
          </div>
        );
      })}
    </div>
  );
};

export default Genres;
